package com.couldsail.takeaway.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("coupon")
@Schema(description = "优惠券实体")
public class Coupon {
    @TableId
    @Schema(description = "优惠券ID")
    private String id;

    @Schema(description = "优惠券名称")
    private String name;

    @Schema(description = "优惠券描述")
    private String description;

    @Schema(description = "优惠券类型：折扣-DISCOUNT, 现金-CASH, 满减-FULL_REDUCTION")
    private String type;  // DISCOUNT, CASH, FULL_REDUCTION

    @Schema(description = "优惠券面值或折扣率")
    private BigDecimal value;

    @Schema(description = "发行总数量")
    private Integer total;

    @Schema(description = "已使用数量")
    private Integer used;

    @Schema(description = "有效期开始时间")
    private LocalDateTime validStart;

    @Schema(description = "有效期结束时间")
    private LocalDateTime validEnd;

    @Schema(description = "最低使用金额")
    private BigDecimal minPurchase;

    @Schema(description = "适用产品列表或规则")
    private String applicableProducts;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
} 